import { get, post,customize,upload } from './http'


// 示例：自定义请求
export const customizeRequest = cab => customize(cab);

// 示例：Get请求
export const areasGet  = cab => get('/manager/rest/api/spBaseArea/areas', cab);



// 用户登录
export const loginPost = cab => post('/open/jwt/token', cab);
// 获取图形验证码
export const kaptchaGet = cab => customizeRequest(cab);

// 用户注册
export const registerPost = cab => post('/open/register/register2', cab);
// 重置密码
export const resetPasswordGet = cab => get('/admin/account/resetPassword', cab);
// 修改密码
export const updatePasswordGet = cab => get('/admin/setting/updatePassword', cab);

// 发送短信验证码
export const sendSmsCodePost = cab => post('/open/register/sendSmsCode', cab);


// 权限/角色 - 获取权限列表
export const getAuthoritiesListGet = cab => get('/admin/account/hasAuthorities', cab);
// 管理员列表
export const getAccountListGet = cab => get('/admin/account/list', cab);
// 角色列表
export const getRolestListGet = cab => get('/admin/account/roles', cab);
// 分配角色
export const assigningRolesPost = cab => post('/admin/account/role', cab);



// 用户基本信息 - 侧栏导航
export const baseInfoNavListGet = cab => get('/admin/baseParameterGroup/findList', cab);
// 用户基本信息 - 组数据
export const baseInfoGroupDataPost = cab => post('/admin/qaStandardRecord/findListByGroup', cab);
// 用户基本信息 - 删除数据
export const deleteRecordAndItemPost = cab => post('/admin/qaStandardRecord/deleteRecordAndItem', cab);


// 用户基本信息 - 保存/更新
export const baseInfoSavePost = cab => post('/admin/qaUserInfo/saveOrUpdate', cab);
// 用户基本信息 - 获取
export const queryInfoByIdGet = cab => get('/admin/qaUserInfo/info', cab);
//部队任（代）职经历 - 保存/更新
export const qaResumeArmyItem = cab => post('/admin/qaResumeArmyItem/saveOrUpdate', cab);
//部队任（代）职经历 - 获取
export const getQaResumeArmyItem = cab => get('/admin/qaResumeArmyItem/findById', cab);
//军兵培训经历 - 保存/更新
export const qaResumeArmyTrainItem = cab => post('/admin/qaResumeArmyTrainItem/saveOrUpdate', cab);
//军兵培训经历 -  获取
export const getQaResumeArmyTrainItem = cab => get('/admin/qaResumeArmyTrainItem/findById', cab);
//维和援外任务经历 -  保存/更新
export const qaResumePeaceKeepItem = cab => post('/admin/qaResumePeaceKeepItem/saveOrUpdate', cab);
//维和援外任务经历 -  获取
export const getQaResumePeaceKeepItem = cab => get('/admin/qaResumePeaceKeepItem/findById', cab);
//出国留学经历 -  保存/更新
export const qaResumeStudyAbroadItem = cab => post('/admin/qaResumeStudyAbroadItem/saveOrUpdate', cab);
//出国留学经历 -  获取
export const getQaResumeStudyAbroadItem = cab => get('/admin/qaResumeStudyAbroadItem/findById', cab);


// 基本信息 - 获取所有字段
export const infoEntryAllFieldPost = cab => post('/admin/baseParameterGroup/options', cab);
// 基本信息 - 获取所有已录入的数据
export const infoEntryEnteredDataPost = cab => post('/admin/qaStandardRecord/userSelections', cab);
// 基本信息 - 导出模板
export const infoEntryEnteredExportModelGet = cab => customizeRequest(cab);
// 基本信息 - 导出数据
// export const infoEntryEnteredExportModelGet = cab => customizeRequest(cab);
// 基本信息 - 导入数据
export const infoEntryEnteredImportPost = cab => post('/excel/import', cab);
// 基本信息 - 保存数据
export const infoEntryEnteredSavePost = cab => post('/admin/qaStandardRecord/saveStandardRecordItems', cab);
// 基本信息 - 提交
export const infoEntryCommitPost = cab => post('/admin/qaStandardRecord/commit', cab);
// 基本信息 - 获取职称分类option选项列表
export const infoEntryQaCategoriesPost = cab => post('/admin/qaCategory/findQaCategories', cab);
// 基本信息 - 通过职称获取岗位名称
export const infoEntryCategoryTypePost = cab => post('/admin/qaCategory/findCategoryType', cab);
// 基本信息 - 通过分组id获取录入信息下拉选项及当前用户选项
export const infoEntryGoupFieldPost = cab => post('/admin/baseParameterGroup/findGroup', cab);
// 基本信息 - 上传附件
export const infoEntryUploadFilePost = cab => post('/admin/qaStandardRecord/uploadStandardRecordFile', cab);
// 基本信息 - 上传图片
export const infoEntryUploadImagePost = cab => post('/admin/qaStandardRecord/uploadUserImg', cab);



// 资料录入阶段接口
export const infoPartGet = cab => get('/admin/qaUserInfo/infoPart', cab);

// 资料录入 - 展示条件
export const infoEntryConditionPost = cab => post('/admin/qaApplyRecord/applyInfo', cab);
// 资料录入 - 保存
export const infoEntrySavePost = cab => post('/admin/qaApplyRecord/summit', cab);
// 资料录入 - 上传附件
export const infoEntryUploadPost = cab => post('/admin/qaClause/upload', cab);


// 申请职称 - 查询评审结果
export const applyForTitleFindResultPost = cab => post('/admin/qaAcademicRecord/findUserAcademic', cab);
// 申请职称 - OPTIONS - 获取参评选项
export const applyForTitleFindOptionsPost = cab => post('/admin/qaAcademicRecord/findUserCategory', cab);
// 申请职称 - 申请
export const applyForTitleSavePost = cab => post('/admin/qaAcademicRecord/saveUserCategory', cab);


// 个人首页
export const persnoalHomePost = cab => post('/admin/qaApplyRecord/personalPage', cab);
// 个人首页 - 系统公告
export const sysNoticePost = cab => post('/admin/qaNotice/page', cab);
// 个人首页 - 各类职称评审业绩条件
export const findCategoryListPost = cab => post('/admin/qaCategory/findCategoryList', cab);


// 信息查询
export const infoQueryPost = cab => post('/admin/qaApplyRecord/query', cab);

// 数据统计页
export const findListCategory = cab => post('/admin/qaCategory/findCategorysRate', cab); //五大类人员占比统计
export const findListJobTitle = cab => post('/admin/qaCategory/findCategoryTitlesRate', cab); //五大类人员职称占比统计
export const findListDetails = cab => post('/admin/qaCategory/findCategorys', cab);   //五大类信息详情
export const findListChildCategory = cab => post('/admin/qaCategory/findCategoryTypesRate', cab);//17小类人员占比统计
// 数据统计页 - 拟参评人员占比
export const findListRecordsRate = cab => post('/admin/qaCategory/findRecordsRate', cab);
//1.1	数据统计导出参数（时间参数不调用此接口）下拉框
export const findListByTypedata = cab => get('/admin/baseSimpleDefinition/findListByType', cab);
// 1.3	数据统计导出参数-导出的选择项
export const StandardRecordOutParam = cab => get('/admin/qaStandardRecord/findStandardRecordOutParam', cab);
//1.2	数据统计查询
export const findListByStandardRecordClause = cab => post('/admin/qaStandardRecord/findListByStandardRecordClause', cab);
//1.4	数据统计导出
export const downStandardRecordClause = cab => post('/admin/qaStandardRecord/downloadListByStandardRecordClause', cab);
//人员信息错误下载
export const downloadrenyaun = cab => get('/admin/qaStandardRecord/download', cab);





//已审核人员信息/待审核人员信息/人员职称表
export const findApplyRecordList = cab => post('/admin/qaApplyRecord/findList', cab);

//审核详情
export const findAuditDetails = cab => post('/admin/qaApplyRecord/auditDetails', cab);
//审核详情 提人工审核通过/不通过
export const findApprove = cab => post('/admin/qaApplyRecord/approve', cab);

//找回密码
export const findResetPassword = cab => post('/open/register/resetPassword', cab);

//获取基本信息 下拉选项数据
export const selectOptions = cab => post('/admin/baseSimpleDefinition/selectOptions', cab);

//人员信息 页面接口地址
export const findListByType = cab => get('/admin/baseSimpleDefinition/findListByType', cab); //右侧导航
export const qaStandardRecordFindList = cab => post('/admin/qaStandardRecord/findList', cab); //条件查询用户标准信息记录列表
export const qaStandardRecordFindDetails = cab => get('/admin//qaStandardRecord/findDetails', cab); //通过userId 获取用户详细信息
export const qaStandardRecordUploadPost = cab => post('/admin/qaStandardRecord/upload', cab);

// 拟参评管理 - 人员列表/拟参评符合、不符合人员列表
export const participationPeopleListPost = cab => post('/admin/qaAcademicRecord/findRecordsList', cab);

// 拟参评管理 - OPTIONS - 职称名称列表
export const participationFindTitlesTypePost = cab => post('/admin/qaCategory/findTitles', cab);

// 拟参评管理 - OPTIONS - 拟参评职称等级列表
export const participationFindAcademicTypePost = cab => post('/admin/qaCategory/findAcademicType', cab);

// 拟参评管理 - OPTIONS - 职称岗位列表
export const participationFindCategoryTypePost = cab => post('/admin/qaCategory/findCategoryTypes', cab);

// 拟参评管理 - 符合人员占比
export const participationFindPassRatePost = cab => post('/admin/qaAcademicRecord/findRecordsRate', cab);

// 拟参评管理 - 不符合人员占比
export const participationFindNotPassRatePost = cab => post('/admin/qaAcademicRecord/findNotPassRate', cab);

// 拟参评管理 - 不符合人员详情
export const participationFindNotPassDetailPost = cab => post('/admin/qaAcademicRecord/findNotPassDetails', cab);


//参评申请 - 筛选框内容
export const findUserCategory1 = cab => post('/admin/qaAcademicRecord/findUserCategory1', cab);
//参评申请 - 查询申请参评内容
export const findUserApplygointo = cab => post('/admin/applyParticipate/applygointo', cab);
//参评申请 - 保存
export const saveProfessionalApplygointo = cab => post('/admin/ProfessionalEvaluation/saveProfessionalEvaluation', cab);
//参评申请 - 提交
export const submitProfessionalApplygointo = cab => post('/admin/ProfessionalEvaluation/submitProfessionalEvaluation', cab);
//参评申请 - 撤销提交
export const ApplygointoUnSubmit = cab => post('/admin/into/unSubmit', cab);
//参评申请 - 获取提交状态
export const getSubmitStatus = cab => post('/admin/ProfessionalEvaluation/getSubmitStatus', cab);
//参评申请 - 预览
export const getPreviewInfo = cab => post('/admin/applyParticipate/preview', cab);
//参评申请 - 提示时判断是否提交过个人信息
export const getPersonStatus = cab => post('/admin/ProfessionalEvaluation/getPersonStatus', cab);

//参评人员 - 获取人员
export const participantsFindList = cab => post('/participants/findList', cab);
//参评人员 - 转移
export const participantsMove = cab => post('/participants/move', cab);
//参评人员 - 进入参评||取消参评
export const participation = cab => post('/participants/participation', cab);

//专家管理 - 查询专家列表
export const findExpert = cab => post('/open/register/findExpert', cab);
//专家管理 - 修改专家
export const updateExpert = cab => post('/open/register/updateExpert', cab);
//专家管理 - 新增专家
export const register3 = cab => post('/open/register/register3', cab);
//专家管理 - 删除专家
export const delExpert = cab => post('/open/register/delExpert', cab);

//评审设置 - 获取评审信息
export const findCfg = cab => post('/reviewCfg/findCfg', cab);
//评审设置 - 获取专家
export const findExperts = cab => post('/reviewCfg/findExperts', cab);
//评审设置 - 添加设置
export const addCfg = cab => post('/reviewCfg/addCfg', cab);
//评审设置 - 删除
export const deleteCfg = cab => post('/reviewCfg/deleteCfg', cab);
//评审设置 - 获取日期
export const findCfgTime = cab => post('/reviewCfg/findCfgTime', cab);

//评审公告 - 获取信息
export const findExpertTask = cab => post('/admin/expert/findExpertTask', cab);

//专家评审 - 获取信息
export const findExpertReviews = cab => post('/admin/into/findList', cab);
//专家评审 - 投票
export const expertVote = cab => post('/admin/into/vote', cab);
//专家评审 - 取消投票
export const expertUnVote = cab => post('/admin/into/unVote', cab);
//专家评审 - 提交投票结果
export const expertCommitVote = cab => post('/admin/into/commitVote', cab);

//评审结果 - 获取结果信息
export const findResultList = cab => post('/admin/into/findResult', cab);
//评审结果 - 投票进度
export const findSchedule = cab => post('/admin/into/findSchedule', cab);
//评审结果 - 再次评审
export const intoAgain = cab => post('/admin/into/intoAgain', cab);
//评审结果 - 导出
export const exportInfo = cab => customizeRequest(cab);


//数据修复
export const repairData = cab => post('/admin/into/repairData', cab);
//管理员获取参评人员信息
export const applyParticipate = cab => post('/admin/applyParticipate/apply', cab);
//管理员修改参评人员信息
export const updateDataByUserId = cab => post('/admin/into/updateDataByUserId', cab);
//专家获取参评人员信息
export const findDataByUserId = cab => post('/admin/into/findDataByUserId', cab);
//查询信息录入、申请参评、投票时间段
export const getTimeData = cab => post('/admin/into/timeData', cab);
//参评人员 - 审核管理员查询是否审核
export const adminFind = cab => post('/admin/into/adminFind', cab);
//参评人员 - 审核管理员 确认审核
export const adminSubmit = cab => post('/admin/into/adminSubmit', cab);
//参评人员 - 审核管理员 确认审核
export const findImg = cab => post('/admin/into/findImg', cab);
